POV-Ray : Newsgroups : povray.newusers : How can I do an arrow? : Re: How can I do an arrow? Server Time
30 Jul 2024 08:22:14 EDT (-0400)
  Re: How can I do an arrow?  
From: Oleguer Vilella
Date: 6 Aug 2004 11:56:06
Message: <4113aa16@news.povray.org>
I put your code with my camera, and I couldn't see it. My camera is
#include "colors.inc"
#include "textures.inc"
background { White}
camera { location <0, 1, -100> look_at <1, 1, 1> }
light_source { <170, -30, -100> color White}

I've copied your code and your arrow just desepear. Thank you very much for
the information about the order of the words, I didn't know it, I'll do it
like you. Do you think that's camera problem??




news:41138a68@news.povray.org...
> "Oleguer Vilella" <ole### [at] infonegociocom> wrote in message
> news:411381da@news.povray.org...
> > union {
> > cone { <0,0,0>,2,<3,0,0>,0  }
> > cylinder  { <-5,0,0>,<0,0,0>,1 }
> > pigment { rgb<0,1.1,0> }
> > scale <0.9, 1.6, 1>
> > translate <120, 40, 26>
> > rotate <-0, 0, -26>
> > no_shadow
> > }
> > To the arrow. I have trayed to rotate it to an other direction. I want
to
> > put the cone looking on the other side of the screen, but I couldn't.
When
> I
> > modified the "rotate" vector, all the arrow desapear. What's the
problem??
>
> Hi again, Oleguer.
>
> Probably because of the translate before rotate, which will tend to move
it
> a lot more than just turning it around.
>
> You need to watch the order of transformations you use. And also, I think
> you might not be thinking of degrees of rotate, i.e. 180 = half circle,
and
> instead units (your translate 26 then rotate -26) but I'd only be guessing
> what you're really trying. So maybe you do realize rotate is in degrees by
> default and that is coincidental numbers. Anyway...
>
> That aside, when building an object, try to keep it at or near the origin
> (<0,0,0>) and scale it first, secondly do rotate (or rotate first then
> scale, depending on the situation), lastly translate. That way you are
able
> to turn the objects based on the origin and move around from there. Helps
to
> keep it in one place until the final move. Of course, the better you get
at
> it the easier it is to know how to use other locations and move things
> around. But for simplicities sake, this scale>rotate>translate method
works
> well as long as your object is created at <0,0,0> for some part of it.
>
> For example:
>
> union {
> cone { <0,0,0>,2,<3,0,0>,0  }
> cylinder  { <-5,0,0>,<0,0,0>,1 }
> pigment { rgb<0,1.1,0> }
> scale <0.9, 1.6, 1>
> rotate 180*y // face left
> translate <220, -15, -16> // to right of look_at point
> no_shadow
> }
>
> Not sure if this is anything like you wanted to do but it's on the other
> side now and pointing toward the middle. You'll catch on to the idea if
you
> order your transformations correctly. In fact, you might discover that
> rotate itself has order, so if you must turn it around the y axis and then
x
> you need to use two rotates, since a single one can't be reordered from
> x,y,z. E.g. rotate <0,180,0> rotate <180,0,0>.
>
> Bob H.
>
>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.